import java.util.Arrays;

    public class Text {
        public static int[] arrayMerge(int[] a, int[] b) {
            int[] mergedArray = new int[a.length + b.length];
            System.arraycopy(a, 0, mergedArray, 0, a.length);
            System.arraycopy(b, 0, mergedArray, a.length, b.length);
            Arrays.sort(mergedArray);
            return mergedArray;
        }

        public static void main(String[] args) {
            int[] array1 = {16, 13, 15, 18};
            int[] array2 = {29, 36, 100, 9};
            int[] mergedArray = arrayMerge(array1, array2);
            System.out.println(Arrays.toString(mergedArray));
        }
    }

